﻿<UserControl xmlns:my="clr-namespace:It.Uniba.Di.Cdg.SocialTfs.Client.Objects" 
             x:Class="It.Uniba.Di.Cdg.SocialTfs.Client.Containers.UILogin"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d">

    <UserControl.Background>
        <ImageBrush ImageSource="/It.Uniba.Di.Cdg.SocialTfs.Client;component/Images/Wallpaper.png" />
    </UserControl.Background>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Name="ErrorRow" Height="0" />
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>

        <Label Grid.ColumnSpan="2" Grid.Row="0" Margin="5,10" VerticalAlignment="Bottom" FontSize="28" FontWeight="Bold" Foreground="#FF293955">Login</Label>
        <Label Grid.Column="0" Grid.Row="1" Margin="5,2">Proxy server host</Label>
        <TextBox Name="ProxyHost" Grid.Column="1" Grid.Row="1" Margin="2"></TextBox>

        <Label Grid.Column="0" Grid.Row="2" Margin="5,2">Username</Label>
        <TextBox Name="Username" Grid.Column="1" Grid.Row="2" Margin="2"></TextBox>

        <Label Grid.Column="0" Grid.Row="3" Margin="5,2">Password</Label>
        <PasswordBox Name="Password" Grid.Column="1" Grid.Row="3" Margin="2"></PasswordBox>

        <CheckBox Name="SavePassword" Grid.Row="4" Grid.Column="1" ContentStringFormat="" Margin="0,10" Click="SavePassword_Click">Save Password</CheckBox>

        <CheckBox Name="AutoLogin" Grid.Row="5" Grid.Column="1" ContentStringFormat="" Margin="0,10">Auto Login</CheckBox>

        <Border Grid.ColumnSpan="2" Grid.Row="6" Margin="2" BorderThickness="1" BorderBrush="Black" Background="Red">
            <Label Name="ErrorLabel" HorizontalAlignment="Center" />
        </Border>

        <my:UICustomButton Grid.ColumnSpan="2" Grid.Row="7" Width="75" Height="25" Margin="10" Click="Login_Click" Text="Login" HorizontalAlignment="Right"  StaticBorder="True" IsDefault="True" />

        <TextBlock Grid.ColumnSpan="2" Grid.Row="8" Margin="5,10" VerticalAlignment="Bottom" TextAlignment="Center">
            <Hyperlink  Click="ShowRegistrationButton_Click">I have no account, click here to register</Hyperlink>
        </TextBlock>

    </Grid>
</UserControl>
